package com.scs.application.modules.upms.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.scs.application.modules.upms.entity.Menu;
import com.scs.application.modules.upms.request.MenuQueryRequest;
import com.scs.application.modules.upms.vo.MenuVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Description: 菜单Mapper
 */
@Mapper
public interface MenuMapper extends BaseMapper<Menu> {

    IPage<MenuVO> page(IPage page, @Param("request") MenuQueryRequest request);


    /**
     * 根据用户ID获取菜单
     * @param userId
     * @param excludeButton
     * @return
     */
    List<Menu> getUserMenu(@Param("userId") String userId, @Param("excludeButton") boolean excludeButton);


    List<String> getUserPermissions(@Param("userId") String userId);

}
